<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>选择学校</title>
    

  </head>
   <script type="text/javascript" src="${staticWebsite}js/jquery-1.7.2.js"></script>
     <link rel="stylesheet" href="${staticWebsite}css/common/popLayer.css" type="text/css" />
     <script type="text/javascript">
       $(document).ready(function() {
       	
       	//省份学校联动
		$(".province").live("click",function(){
		    var thisObj=$(this);
		    var data=$(this).attr("data");
		    $.ajax({
				type:"post",
				data:"provinceId="+$.trim(data),
				url:"${website}popLayer/popLayer_getUniversityByProvince.action",
				success:function(flag){
					$("#universityDiv").html("");
					$("#universityDiv").html(flag);
				},
		   });	
		   
		});
		
		//单击学校事件
		 $(".university").live("click",function(){
		    //   $("#a",window.parent.document).html("aaaaaaaa");
		       thisObj=$(this);
		        var attr=new Array();
		        attr[0]=thisObj.attr("universityId");
		        attr[1]=thisObj.attr("universityName");
		        attr[2]=thisObj.attr("provinceId");
		      //  alert(attr[0]);
		      //  alert(attr[1]);
				self.parent.tb_remove();
				//$("#close").trigger("click");
				self.parent.preview(attr);
			});
		
		
		//关闭按钮
		 $("#close").click(function(){
				self.parent.tb_remove();
			});
			
       	});
     </script>
  <body>
  <p id="headDiv">选择学校</p>
   <div>
     <c:forEach items="${provinceList}" var="i">
       <a href="#" class="province" data="${i.id}"> ${i.provinceName}</a>
     </c:forEach>
   </div>
   <div id="universityDiv">
     <c:forEach items="${universityList}" var="i">
       <a href="#" class="university" universityId="${i.id}" universityName="${i.universityName}" provinceId="${i.provinceId}"> ${i.universityName}</a>
     </c:forEach>
   </div>
   
    <div align="right" id="footDiv"><input type="button" id="close" value="关闭"/></div>
  </body>
</html>
